/**
 * 渲染全部会议
 */
function all_Cmeeting(){
	console.log("全部会议");
}
/**
 * 渲染公司例会
 */
function com_Cmeeting(){
	console.log("日常会议");
	getMeetingByType(1,"#table_com_meeting");
}
/**
 * 渲染讨论会
 */
function dis_Cmeeting(){
	console.log("讨论会议");
	getMeetingByType(2,"#table_dis_meeting");
/**
 * 立项会议
 */
}function pro_Cmeeting(){
	console.log("立项会议");
	getMeetingByType(1,"#table_pro_meeting");
}
/**
 * 渲染部门会议
 */
function dept_Cmeeting(){
	console.log("部门会议");
	getMeetingByType(1,"#table_dept_meeting");
}
/**
 * 通过会议类型获取会议类型
 * @param {Object} type
 * @param {Object} tableId
 */
function getMeetingByType(type,tableId){
	var meetingData = [];
	$.ajax({
		type: "post",
		url: "getMeetingInfoByType",
		async: true,
		cache: false,
		datatype: "json",
		data: {
			type: type,       //传递会议类型
		},
		success: function(data) {
			meetingData = data;
		},
		complete: function() {
			showMeetingInfo(meetingData,tableId); //渲染表格
		}
	});
}
/**
 * 渲染
 * @param {Object} data
 * @param {Object} tableId
 */
function showMeetingInfo(data,tableId){
	console.log(tableId);
	var addHTML = "";   //元素标签
	$(tableId).empty();   //清空表格的数据
	var color = "warning";
	for(var i = 0; i < data.length; i++) {
		addHTML = addHTML + "<tr class='" + color + "'>" +
			"<td>" + data[i].mid + "</td>" +
			"<td>" + data[i].mname + "</td>" +
			"<td>" + data[i].meetingDate + "</td>" +
			"<td>" + data[i].meetingContent + "</td>" +
			"<td>" + data[i].taskRealStartTime + "</td>" +
			"<td>" + data[i].taskRealEndTime + "</td>" +
			"<td>" + data[i].taskTotalPoint + "</td>"+
			"<td>" + data[i].taskContent + "</td>" +
			"</tr></a>";
	}
	$(tableId).append(addHTML);
}

